Scalable virtual partitioning of resources

ABSTRACT

Resources are partitioned via a virtual partitioning system to distribute the resources over a plurality of resource servers. A virtual partition table can be kept at each of a set of resource managers handling requests for resources in tandem. When a resource is requested, a virtual partition value is calculated algorithmically, and the value is mapped to a resource component via the virtual partition table. The resource component encapsulates information indicating on which of the resource servers the resource resides and can provide a component for performing operations on the resource even though the requester does not have information about where the resource resides. The resources can be repartitioned by modifying the virtual partition table, thus allowing the addition of additional resource servers to the system while the resources remain available. Additional resource types can be added without reengineering the system.

CROSS REFERENCE TO RELATED APPLICATION

This application is a divisional of U.S. patent application Ser. No.09/632,382, filed Aug. 3, 2000, which is incorporated herein byreference in its entirety.

TECHNICAL FIELD

The technical field relates to partitioning resources provided to a setof client computers accessing the resources via a network.

COPYRIGHT AUTHORIZATION

A portion of the disclosure of this patent document contains materialthat is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

BACKGROUND

The tremendous popularity of the World Wide Web has presented a numberof challenges to web site administrators. As the number of computerusers having access to web browsers increases, web site administratorsconstantly work to improve the efficiency of their web sites in the faceof explosive growth in both the number of users visiting their site andthe sheer quantity of information being provided. Many web siteadministrators have discovered that a single web server computer can notperform the tasks necessary to receive and fulfill requests from usersbrowsing their site, no matter how well the web server computer isoptimized.

One way web site administrators address the challenges presented bymassive numbers of browsing users is by placing content on a computerseparate from the web server by using a facility called “virtualdirectories.” The virtual directory feature is supported by MICROSOFTInternet Information Server (IIS), a product available from MicrosoftCorporation of Redmond, Wash. One aspect of a virtual directory allows aweb site administrator to redirect requests for information (e.g., webpages in “http://a.b.com/products/”) to a server separate from the webserver. The web site administrator configures such a system by creatinga virtual directory and specifying the location from which theinformation is to be drawn for the virtual directory.

The web site administrator can then deploy several web servers onseveral machines, all drawing content from a content server running onyet another machine. Requests for information can be divided among theseveral web servers via a routing mechanism. In this way, the webservers can be optimized to field requests for content, and the contentserver can be optimized to serve content. The content server need notprovide full web server functionality, and its computing resources canbe devoted to serving content, leading to greater availability of thedata.

Still, however, the content is being drawn from a single content server.As the amount of data increases, the single content server becomesoverwhelmed. Web site administrators have responded by creating multiplevirtual directories and pointing them to multiple different servers. Theadministrator can then scatter the site's web pages over multiplecontent servers by placing them in different virtual directories. When arequest for a web page comes in to the web site, the software fieldingthe request at a web server maps the requested page's location (e.g.,“products”) to virtual directory information, which specifies on whichcontent server the content resides. Web site administrators thus attemptto avoid overload of any single machine by directing only a percentageof the incoming requests for web pages to any one content server.

SUMMARY

The described approach of using multiple content servers in conjunctionwith virtual directories suffers from some drawbacks. First, dividingthe content into virtual directories can sometimes result in anartificial division of content that is exposed to the browsing user.Typically, the web site administrator is forced to design the virtualdirectory structure in anticipation of how much load will be handled bya server. For example, in a system where new users are assigned spacefor storing information on the web site, the web site administratormight create three virtual directories (“server1/” “server2/”, and“server3/) and assign users with log on names starting with the letters“A-H” to server1/, users with log on names “I-P” to server2/, and userswith log on names “Q-Z” to server3/.

Users browsing the site will see the virtual directory (e.g.,http://www.a.b.com/server3/smith/) when browsing the site. However, thefact that the content resides on server3 is unimportant to the browsinguser, and including the virtual directory information results inawkward, lengthy references to web pages.

Further, the web site may grow, and the virtual directory featurepresents problems when the web site administrator wishes to add anadditional content server. For example, she might wish to divide anexisting virtual directory (e.g. “server2/”) into two separate virtualdirectories (e.g., “server2/” and “server4/”) to direct some requestsfor information to the additional content server.

To add the additional content server and a new virtual directory,current information from the old virtual directory must be copied.However, if the web site is active, additional changes might be made tothe directory by browsing users during the copy process. So, the copiedinformation is no longer current. Thus, copying leads to asynchronization problem.

To solve the synchronization problem, the web site administrator mayshut down the virtual directory while changes are being made. However,such an approach has the undesirable side effect of disrupting servicefor a large number of users. Typically, the virtual directory is beingdivided because it is popular, so shutting it down involves shuttingdown one of the site's more popular areas. And, if the directorycontains a large volume of information, the copy process may take sometime. Thus, a popular area of the web site is unavailable for anextended period.

Further, modifying the virtual directory information is not a simpleprocess. Typically, the virtual directory information is stored locallyat each of the web servers. Thus, the web site administrator must changethe information at each of the servers. As the number of servers grows,such a task can be prohibitively time-consuming.

Further, even if the virtual directory facility is used, it is stillpossible that a single virtual directory cannot be easily divided. Ifsuch a virtual directory is being overwhelmed with requests, the website administrator is left with no mechanism to efficiently divide thecontent among separate content servers. Thus, there is a need for a moreeffective way to divide content among separate content servers.

The invention includes methods and systems relating to various ways ofaddressing the issues surrounding scenarios involving partitioningresources among multiple servers. For example, a virtual partitionsystem can be designed to determine a partition value algorithmically.Thus, each of the web servers can determine on which partition aresource resides without reference to a central map. Once the partitionvalue is determined, it can then be mapped to a resource component,which provides access to a resource server, regardless of the resourceserver's technology or the type of resource provided.

Since the partition value can be determined algorithmically, theunderlying structure of the partition system need not be exposed to thebrowsing user. Instead, the resources can be partitioned based on a key(e.g., user name or subject) associated with the resource.

The virtual partitions can be arbitrarily mapped among a number ofservers serving the resources. For example, all the virtual partitionsmight be assigned to a single server, or each virtual partition might beassigned to a different server. The system can thus scale from a singleserver to many servers.

A set of resource managers can field resource requests at a plurality ofweb servers and use the virtual partition system in tandem withreference to a local map indicating partition mapping. Although aresource administrator feature is provided to manage the partitionmapping across the resource managers, the virtual partition systemcontinues to function even if the resource administrator feature becomesunavailable.

In another feature, the virtual partition system supports repartitioningwhile allowing access to the resources. Repartitioning can be used toadd a new resource server to the web site with minimal impact onbrowsing users. If there are a large number of possible virtualpartition values, only a very small percentage of the resources islocked during repartitioning. Further, the resources can still be readduring repartitioning, avoiding disruption to the web site. Resourcescan be further partitioned by resource type to provide the web siteadministrator with an additional way to partition the resources.Repartitioning can be accomplished via a single directive by a user,rather than a directive at each machine.

The virtual partition system can employ resource components having astandard set of invokable functions. The functions are suitable for usewith a wide variety of resource servers, regardless of the type ofresource. For example, a resource server developer can assemble aresource component suitable for providing access to a certain type ofresource as long as it makes the standard set of functions available.The resource component may handle resource access itself or serveanother component if, for example, state information is to be maintainedduring access to a resource.

The resource administrator feature also allows an administrating user toalter configuration information used at the resource managers. In thisway, the system allows convenient configuration changes across of alarge number of servers at once.

Additional features and advantages of the invention will be madeapparent from the following detailed description of illustratedembodiments, which proceeds with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a computer system that may be used toimplement the described optimization system.

FIG. 2 is a block diagram of an object conforming to the ComponentObject Model specification of Microsoft Corporation, which may be usedfor implementing programming components associated with the invention.

FIG. 3 is a block diagram showing an environment suitable for hosting aweb site.

FIG. 4 is a high-level block diagram showing an overview of an exemplaryweb site using features of the invention.

FIG. 5 is a block diagram showing an overview of an exemplary resourcemanager.

FIGS. 6A-6D are block diagrams showing exemplary resource components fordealing with resources.

FIG. 7 is a block diagram showing an exemplary resource administratorfor administering a virtual partition system.

FIG. 8 is a flow chart showing a method for accessing a resource in asystem such as that shown in FIG. 4.

FIG. 9 is a flow chart showing a method for repartitioning resources ina system such as that shown in FIG. 4.

FIG. 10 is a block diagram of an online community center.

FIG. 11 is a block diagram showing information related to a particularcommunity of the online community center of FIG. 10.

FIG. 12 is a block diagram showing an exemplary architecture forpartitioning resources in an online community center such as that ofFIG. 10.

FIG. 13A is a diagram showing a virtual partition table.

FIG. 13B is a diagram showing a virtual partition table and referencesto resource components.

FIG. 14 is a code listing of logic for providing access to a resourcevia the virtual partition table shown in FIG. 13B.

FIG. 15A is a code listing illustrating a function provided by aresource manager.

FIG. 15B is a code listing illustrating a hashing function performed ona partition key to obtain a virtual partition value.

FIGS. 16-17 are code listings showing a standard interface to a photoalbum resource component.

FIG. 18 is a code listing showing a photo object, such as one providedvia the standard interface of FIGS. 16-17.

FIG. 19 is a code listing showing an example of using resourcecomponents to view a photo.

FIG. 20 is a code listing of an interface supported by resourcecomponents in an illustrated architecture.

FIG. 21 is a code listing of data structures for use with a resourceadministrator.

FIG. 22 is a code listing of an interface provided by a resourceadministrator for use by a resource manager.

FIGS. 23-24 are code listings of an interface provided by a resourceadministrator for use by a resource administrator client.

FIGS. 25, 26, 27, 28, and 29 are code listings of a set of functionsprovided by a resource administrator client.

FIG. 30 is a flow chart showing a method for repartitioning resources.

FIG. 31 is a flow chart showing a method for migrating a bucket in avirtual partition table.

FIG. 32 is a flow chart showing a method for copying resources duringbucket migration, such as that of FIG. 31.

DETAILED DESCRIPTION

The invention is directed to methods and systems related to providingaccess to resources via multiple resource servers. In one embodimentillustrated herein, the invention is used in conjunction with MICROSOFTInternet Information Service, marketed by Microsoft Corporation ofRedmond, Wash. Briefly described, the Internet Information Servicesoftware is a versatile service suitable for use in a wide variety ofweb site scenarios.

DEFINITIONS

The term instantiate includes both creating a programming component of aparticular class and obtaining a programming component from a pool ofprogramming components already created.

The term resource server includes a single computer server or a clusterof servers serving resources. Such servers include data servers (e.g.,file servers and database servers), application servers, and the like.

Exemplary Operating Environment

FIG. 1 and the following discussion are intended to provide a brief,general description of a suitable computing environment in which theinvention may be implemented. While the invention will be described inthe general context of computer-executable instructions of a computerprogram that runs on a computer, the invention also may be implementedin combination with other programs. Generally, programs includeroutines, software objects (also called components), data structures,etc. that perform particular tasks or implement particular abstract datatypes. Moreover, the invention may be practiced with other computersystem configurations, including single- or multiprocessor computersystems, minicomputers, mainframe computers, as well as personalcomputers, hand-held computing devices, microprocessor-based orprogrammable consumer electronics, and the like. The illustratedembodiment of the invention also is practiced in distributed computingenvironments where tasks are performed by remote processing devices thatare linked through a communications network. But, some embodiments ofthe invention can be practiced on stand-alone computers. In adistributed computing environment, program modules may be located inboth local and remote memory storage devices.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a conventional computer 20, including a processingunit 21, a system memory 22, and a system bus 23 that couples varioussystem components including the system memory to the processing unit 21.The processing unit may be any of various commercially availableprocessors, including Intel x86, Pentium and compatible microprocessorsfrom Intel and others, including Cyrix, AMD and Nexgen; Alpha fromDigital; MIPS from MIPS Technology, NEC, IDT, Siemens, and others; andthe PowerPC from IBM and Motorola. Dual microprocessors and othermulti-processor architectures also can be used as the processing unit21.

The system bus may be any of several types of bus structures including amemory bus or memory controller, a peripheral bus, and a local bus usingany of a variety of conventional bus architectures such as PCI, VESA,Microchannel, ISA and EISA, to name a few. The system memory includesread only memory (ROM) 24 and random access memory (RAM) 25. A basicinput/output system (BIOS), containing the basic routines that help totransfer information between elements within the computer 20, such asduring start-up, is stored in ROM 24.

The computer 20 further includes a hard disk drive 27, a magnetic diskdrive 28, e.g., to read from or write to a removable disk 29, and anoptical disk drive 30, e.g., for reading a CD-ROM disk 31 or to readfrom or write to other optical media. The hard disk drive 27, magneticdisk drive 28, and optical disk drive 30 are connected to the system bus23 by a hard disk drive interface 32, a magnetic disk drive interface33, and an optical drive interface 34, respectively. The drives andtheir associated computer-readable media provide nonvolatile storage ofdata, data structures, computer-executable instructions, etc. for thecomputer 20. Although the description of computer-readable media aboverefers to a hard disk, a removable magnetic disk and a CD, it should beappreciated by those skilled in the art that other types of media whichare readable by a computer, such as magnetic cassettes, flash memorycards, digital video disks, Bernoulli cartridges, and the like, may alsobe used in the exemplary operating environment.

A number of programs may be stored in the drives and RAM 25, includingan operating system 35, one or more application programs 36, otherprograms 37, and program data 38. The operating system 35 in theillustrated computer may be the MICROSOFT WINDOWS NT Server operatingsystem, together with the before mentioned MICROSOFT Transaction Server.

A user may enter commands and information into the computer 20 through akeyboard 40 and pointing device, such as a mouse 42. Other input devices(not shown) may include a microphone, joystick, game pad, satellitedish, scanner, or the like. These and other input devices are oftenconnected to the processing unit 21 through a serial port interface 46that is coupled to the system bus, but may be connected by otherinterfaces, such as a parallel port, game port or a universal serial bus(USB). A monitor 47 or other type of display device is also connected tothe system bus 23 via an interface, such as a video adapter 48. Inaddition to the monitor, computers typically include other peripheraloutput devices (not shown), such as speakers and printers.

The computer 20 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote clientcomputer 49. The remote computer 49 may be a workstation, a terminalcomputer, another server computer, a router, a peer device or othercommon network node, and typically includes many or all of the elementsdescribed relative to the computer 20, although only a memory storagedevice 50 has been illustrated in FIG. 1. The logical connectionsdepicted in FIG. 1 include a local area network (LAN) 51 and a wide areanetwork (WAN) 52. Such networking environments are commonplace inoffices, enterprise-wide computer networks, intranets, extranets, andthe Internet.

When used in a LAN networking environment, the computer 20 is connectedto the local network 51 through a network interface or adapter 53. Whenused in a WAN networking environment, the computer 20 typically includesa modem 54, or is connected to a communications server on the LAN, orhas other means for establishing communications over the wide areanetwork 52, such as the Internet. The modem 54, which may be internal orexternal, is connected to the system bus 23 via the serial portinterface 46. In a networked environment, program modules depictedrelative to the computer 20, or portions thereof, may be stored in theremote memory storage device. It will be appreciated that the networkconnections shown are exemplary and other means of establishing acommunications link between the computers may be used.

In accordance with the practices of persons skilled in the art ofcomputer programming, the present invention is described below withreference to acts and symbolic representations of operations that areperformed by the computer 20, unless indicated otherwise. Such acts andoperations are sometimes referred to as being computer-executed. It willbe appreciated that the acts and symbolically represented operationsinclude the following: manipulation by the processing unit 21 ofelectrical signals representing data bits, which causes a resultingtransformation or reduction of the electrical signal representation; themaintenance of data bits at memory locations in the memory system(including the system memory 22, hard drive 27, floppy disks 29, andCD-ROM 31) to thereby reconfigure or otherwise alter the computersystem's operation; as well as other processing of signals. The memorylocations where data bits are maintained are physical locations thathave particular electrical, magnetic, or optical propertiescorresponding to the data bits.

Programming Component Overview

FIG. 2 and the following discussion are intended to provide an overviewof programming components, using the MICROSOFT Component Object Model(COM) as an exemplary model for programming components. In theillustrated embodiments, a software management framework is implementedin the MICROSOFT COM Environment. COM is a model for accommodatingprogramming components and can be implemented on a variety of platforms,such as the MICROSOFT WINDOWS NT operating system. In the illustratedembodiments of the invention, the programming components conform to theMICROSOFT Component Object Model (“COM”) specification (i.e., areimplemented as a “COM Object” 76) and are executed using the COMservices of the MICROSOFT WINDOWS 2000 operating system, butalternatively may be implemented according to other object standards(including the CORBA (Common Object Request Broker Architecture)specification of the Object Management Group and JAVABEANS by SunMicrosystems) and executed under object services of another operatingsystem. The COM specification defines binary standards for programmingcomponents and their interfaces which facilitate the integration ofprogramming components into programs. (For a detailed discussion of COMand OLE, see Kraig Brockschmidt, Inside OLE, Second Edition, MicrosoftPress, Redmond, Wash. (1995)).

In accordance with COM, the COM object 60 is represented in the computersystem 20 (FIG. 1) by an instance data structure 62, a virtual functiontable 64, and member methods (also called member functions) 66-68. Theinstance data structure 62 contains a pointer 70 to the virtual functiontable 64 and data 72 (also referred to as data members or properties ofthe programming component). A pointer is a data value that holds areference to an item. As will be explained in greater detail below, theconventional instance data structure 70 is modified to accommodategrouping the data members into separate groups. The virtual functiontable 64 contains entries 76-78 for the member methods 66-68. Each ofthe entries 76-78 contains a reference to the code 66-68 that implementsthe corresponding member methods.

The pointer 70, the virtual function table 64, and the member methods66-68 implement an interface of the COM object 60. By convention, theinterfaces of a COM object are illustrated graphically as a plug-in jackas shown for the programming components 422 in FIG. 4. Also, interfacesconventionally are given names beginning with a capital “I.” Inaccordance with COM, the COM object 60 can include multiple interfaces,which are implemented with one or more virtual function tables. Themember function of an interface is denoted as“IInterfaceName:MethodName.” Other systems can use a similar approach,even though the grouped methods are not called an interface.

The virtual function table 64 and member methods 66-68 of the COM object60 are provided by a programming component server program 80 (hereafter“object server DLL”) which is stored in the computer 20 (FIG. 1) as adynamic link library file (denoted with a “.dll” file name extension).In accordance with COM, the object server DLL 80 includes code for thevirtual function table 64 and member methods 66-68 of the classes thatit supports, and also includes a class factory 82 that generates theinstance data structure 62 for a programming component of the class. Insome cases, a COM object can be implemented without a virtual functiontable.

Other programming components and programs (referred to as a “client” ofthe COM object 60) access the functionality of the COM object byinvoking the member methods through the COM object's interfaces.Typically, however, the COM object is first instantiated (i.e., bycausing the class factory to create the instance data structure 62 ofthe programming component); and the client obtains an interface pointerto the COM object.

Before the COM object 60 can be instantiated, the programming componentis first installed on the computer 20. Typically, installation involvesinstalling a group of related programming components called a package.The COM object 60 is installed by storing the object server DLL file(s)80 that provides the programming component in data storage accessible bythe computer 20 (typically the hard drive 27, shown in FIG. 1), andregistering COM attributes (e.g., class identifier, path and name of theobject server DLL file 80, etc.) of the COM object in one or more datastores storing configuration information. Configuration data stores forthe programming component include a registry and a catalog.

A client requests instantiation of the COM object using system-providedservices and a set of standard, system-defined component interfacesbased on class and interface identifiers assigned to the COM Object'sclass and interfaces. More specifically, the services are available toclient programs as application programming interface (API) functionsprovided in the COM library, which is a component of the MICROSOFTWINDOWS 2000 operating system in a file named “OLE32.DLL.” Otherversions of COM or other programming components services may use anotherfile or another mechanism. Also in COM, classes of COM objects areuniquely associated with class identifiers (“CLSIDs”) and registered bytheir CLSID in the registry (or the catalog, or both). The registryentry for a COM object class associates the CLSID of the class withinformation identifying an executable file that provides the class(e.g., a DLL file having a class factory to produce an instance of theclass). Class identifiers are 128-bit globally unique identifiers(“GUIDs”) that the programmer creates with a COM service named“CoCreateGUID” (or any of several other APIs and utilities that are usedto create universally unique identifiers) and assigns to the respectiveclasses. The interfaces of a component additionally are associated withinterface identifiers (“IIDs”).

In particular, the COM library provides an API function,“CoCreateInstance( ),” that the client program can call to requestcreation of a component using its assigned CLSID and an IID of a desiredinterface. In response, the “CoCreateInstance( )” API looks up theregistry entry of the requested CLSID in the registry to identify theexecutable file for the class. The “CoCreateInstanceo” API function thenloads the class' executable file and uses the class factory in theexecutable file to create an instance of the COM object 60. Finally, the“CoCreateInstanceo” API function returns a pointer of the requestedinterface to the client program. The “CoCreateInstance( )” API functioncan load the executable file either in the client program's process, orinto a server process which can be either local or remote (i.e., on thesame computer or a remote computer in a distributed computer network)depending on the attributes registered for the COM object 60 in thesystem registry.

Once the client of the COM object 60 has obtained this first interfacepointer of the COM object, the client can obtain pointers of otherdesired interfaces of the component using the interface identifierassociated with the desired interface. COM defines several standardinterfaces generally supported by COM objects including the “IUnknown”interface. This interface includes a member function named“QueryInterface( ).” The “QueryInterface( )” function can be called withan interface identifier as an argument, and returns a pointer to theinterface associated with that interface identifier. The “IUnknown”interface of each COM object also includes member functions, “AddRef( )”and “Release( )”, for maintaining a count of client programs holding areference (e.g., an interface pointer) to the COM object. By convention,the “IUnknown” interface's member functions are included as part of eachinterface on a COM object. Thus, any interface pointer that the clientobtains to an interface of the COM object 60 can be used to call theQueryInterface function.

Web Farm Overview

FIG. 3 shows an environment suitable for hosting a web site 302. Becausethe number of web servers 332A-332D hosting a web site has grown to bemany rows of machines, web site administrators have begun to refer tosuch an environment as a “web farm.”

The web site 302 can accommodate a large number of browsing computers306A-306F having access to a network 312. The browsing computers306A-306F can be of any variety of hardware, including a hand helddevice 306F. Typically, requests from the browsing computers 306A-306Fare received at a router 322, which in turn relays the requests to theweb servers 332A-332D.

While processing requests by the browsing computers 306A-306F, the webservers 332A-332D have access to resource collections 342A-342C. Theresource collections 342A-342C can be, for example, databases or sets offiles. Each resource collection 342A is referred to generally as aresource server. However, in practice, the resource server may be acluster of servers, including a router (not shown), which routesrequests for information among the servers in the cluster. In somecases, multiple resource servers can reside on a single server orcluster of servers.

Although the example shows six browsing computers, four web servers, andthree resource servers, the number of computers in an actual system willdiffer and typically greatly exceeds those shown in the example.

System Architecture Overview

An overview of a web site's system architecture incorporating featuresof the invention is shown in FIG. 4. One of the web servers 402 executeslogic for a request receiver 404, which receives requests directed bybrowsing computers. The request receiver 404 has access to a resourcemanager 406, which utilizes a map/locks structure 412 to direct requestsfor resources to the resource components 422. The resource components422 in turn direct the requests to the resource servers 432A-432C, whichcan be segregated according to resource type.

Because logic in the resource components 422 can handle the detailsrelated to finding and interacting with the resource servers 432A-432C,logic for the resource manager need not address idiosyncrasies relatedto particular resource types. The resource components 422 can bedesigned to encapsulate information for connecting to the resourceservers 432A-432C and manipulating a resource thereon. Thus, newresource types can be added by adding a new resource component withoutreengineering the architecture, and programs requesting a resource areshielded from the details (e.g., where the resource resides) concerninghow to access the resource.

A server computer 440 executes a resource administrator 442 foradministrating the resource managers on the web servers (e.g., resourcemanager 406 on web server 402). The resource administrator 442 caninclude configuration information for assisting in linking the resourcecomponents 422 to the resource servers 432A-432C, a master copy of a mapfor distribution to the resource managers (e.g., 406), and locks forsynchronizing changes made to the map.

Further, the resource administrator 442 may access resource components452 to perform operations on the resource servers 432A-432C, for exampleduring repartitioning operations.

A client computer 460 executes a resource administrator client 462,which presents a user interface for interacting with the resourceadministrator 442. For example, a web site administrator may change theconfiguration information or perform repartitioning operations via auser interface presented by the resource administrator client 462, whichthen directs appropriate directives to the resource administrator 442.

Although the various elements of the web site are shown on differentcomputers, it is possible that elements reside on the same computer. Forexample, the resource administrator 442 may reside on the same computeras the resource administrator client 462. Further, two elements cansometimes be implemented as a single element.

Although FIG. 4 shows the invention in an arrangement involving a webserver, the services provided by the invention can be used by anothersystem (sometimes called a “consumer” of the resources). For example,the invention can be implemented in a mail server, FTP server, or anysystem managing a set of partitioned resources.

Distributed Resource Managers Overview

An example of a resource manager 502 is shown in FIG. 5. Typically, aset of resource managers is distributed about a number of web servers,each of which can field requests for information from browsingcomputers.

In the example, the resource manager includes a request handler 512, towhich requests for a resource can be relayed. A virtual partition valuecalculator 522 calculates a virtual partition value based on the requestusing an algorithmically-based calculation. Typically, the calculationis effectively a reductive mapping. For example, a hash function mightbe performed on an identifier associated with a requested resource. Theidentifier is sometimes called a “key,” although it need not be uniqueto the resource. Such a key might be a user name, a user identifier, asubject name, a virtual location name, a date, a number, a string, orother data.

The request handler 512 can direct a request for a resource to aresource component (not shown) by mapping the value provided by thevirtual partition value calculator 522 to a reference referring to aresource component via a virtual partition table 532. The resourcecomponent encapsulates information for accessing the particular resourceserver on which the resource resides. The location of the resource isthus determined, at least in part, by the key.

The virtual partition table 532 might also include a locking mechanismto allow portions of the table (or the entire table) to be locked whenthe table is modified. For example, if resources on resource servers arerepartitioned, the table might indicate that writes are not permitted toresources about to be relocated during repartitioning. Or, resourcesmight be temporarily made unavailable while a malfunctioning server isreplaced. Although the virtual partition table and locks can beimplemented as a single data structure, they also can be implementedseparately, or some other mechanism can be used for locking.

The resource administrator interface component 552 provides a mechanismfor communicating with a resource administrator. Typically, a two-waycommunication link is set up between a resource manager 502 and aresource administrator to allow exchange of directives and messages. Forexample, when the resource manager is first started, it can retrieveinformation for building the virtual partition table from the resourceadministrator. The resource administrator can also provide theinformation used by the resource components to access the resourceservers. Further, configuration changes and repartitioning directivescan be received via the administrator interface component 552.

Although there may be many resource managers 502 for a single system,they can each receive information from the resource administrator. Thus,configuration changes (e.g., changes in the way connections are made tothe resource servers) across the resource managers can be accomplishedby performing a single operation at the resource administrator, whichpropagates the changes to the resource managers.

Resource Server Overview

The resource servers 432A-432C (FIG. 4) can serve a wide variety ofresources. For example, the resources might include graphics files oruser profiles in the form of files. In such a case, a file systemprovides an identifier for retrieving the resource.

However, the resources can take forms other than files. For example, adatabase server can serve as a resource server and accept queries toprovide a wide variety of resource types. For example, text, XML, HTML,or BLOBs could be provided by a database server. Resource components canencapsulate information that provides details for accessing the resourceserver (e.g., a name and password). The logic in the resource managerand resource administrator thus operates without regard for the detailsrequired to handle a particular resource type and is sometimes called“resource type agnostic.” So, if a new type of resource or resourceserver becomes available, it can be easily incorporated into thearchitecture by adding a new class of resource component withoutmodifying the resource manager or resource administrator design.

Resource Components Overview

Examples of resource components 612, 622, 632, and 642 are shown inFIGS. 6A, 6B, 6C, and 6D. One type of resource component 612 includes astandard interface 614 for receiving requests from the resource managerfor a reference (e.g., and interface) to a component operable to fulfillrequests for a resource. The component operable to fulfill the requestis sometimes called a “session component.” Since the resource componentprovides references to components, it is sometimes called a “componentserver.” In some cases, the resource component 612 may have anadditional custom interface 616 for supporting operations not supportedby the standard interface 614. Further, the resource component, whenreceiving a request via the standard interface 614, may return areference to itself (e.g., the custom interface 616). The resourcecomponent 612 can be designed to support another interface (not shown)for accomplishing repartitioning operations.

In some cases, it may be necessary to maintain state information as aresource is provided. In such a case, a special session resourcecomponent 622 can be provided. In this way, subsequent requests forresources can be done in light of state information (e.g., a currentposition within a set of items) maintained in the session resourcecomponent 622. The session resource component 622 may be drawn from apool of pre-created components to facilitate more efficient processingand then recycled back into the pool when the session is completed.

Two other resource components, the transaction repartitioning component632 and the logical repartitioning component 642, can be used to supportrepartitioning operations in some systems. The transactionrepartitioning component 632 may contain logic for handlingrepartitioning operations related to locking a collection of resourcetypes at a single unit, such as a single resource server or database.The logical repartitioning component 642 may contain logic for handingrepartitioning operations appropriate for a particular resource typewithin the collection.

In some cases, it may be desirable to combine component functionalityfrom two or more components into a single component. For example, asingle component could offer interfaces similar to those provided by theresource component 612 and the logical partitioning component 642.

The various interfaces provided by the resource components may differaccording to scenario. An advantage of the above-described arrangementis that a standard interface can be provided by the resource componentfor requesting access to a resource. Another interface supportsrepartitioning operations. Preferably, the standard interfaces operatewithout regard to the type of resource involved. Under such anarrangement, the resource component encapsulates details for dealingwith a particular resource type. In this way, a resource manager can beused in a system having a wide variety of resource types, and newresource types can be added after deployment of the system by developinga new resource component without reengineering the rest of the system.

Resource Administrator Overview

FIG. 7 shows an example of a resource administrator 702. A resourceadministrator client interface component 712 provides an interface forreceiving directives from a resource administrator client. A typicalresource administrator client provides an interface for a user and canthen relay the user's directives to the resource administrator clientinterface component 712. A resource manager interface component 722provides an interface for receiving communications from the resourcemanagers.

The resource component initialization information 732 includesinformation that can be sent to the resource managers when resourcecomponents are to be initialized. For example, a particular resourceserver might require a string having a username and password for aconnection. The resource administrator can forward the string to theresource manager, which communicates the string to the resourcecomponent responsible for handling requests related to the associatedresource server (e.g., when the component is first loaded). The resourcemanager need not have logic for interpreting the string, but merelypasses it along to the resource component, which in turn passes it tothe resource server.

The resource types information 742 includes information relating to eachof the resource types. For example, when a resource manager first comeson line, it can be provided a list of the resource types for which itcan expect to field requests.

The virtual partition table/locks information 752 contains a master copyof the virtual partition table, which relates virtual partitioncalculation values with resource servers. The table can be provided toresource managers so that the resource managers direct requests to theproper resource server via the resource components. The table includeslocks so that repartitioning operations can be performed while avoidingsynchronization problems.

The repartitioning order information 762 includes information indicatingdependencies in data and can be used in some systems duringrepartitioning to ensure data is copied in the proper sequence. Therepartitioner 777 includes logic for performing repartitioning of thevirtual partition table, including orchestrating copying betweenresource servers. The repartitioner 777 may employ resource componentsto accomplish repartitioning. If the resource components encapsulate thedetails related to repartitioning for a particular resource type, theresource administrator can operate without regard to resource types, andnew resource types can be incorporated into the architecture withoutreengineering the resource administrator.

Fielding a Request for a Resource Overview

FIG. 8 shows an overview of a method for fielding a request for aresource. Such a request is typically received by the resource managerat 802 and includes a key associated with the resource. Then, the key isused to perform a calculation to determine a virtual partition value at812. Then, access to a session resource component is obtained bydirecting a request to the resource component indicated by the virtualpartition table according to the virtual partition value at 832. Thevirtual partition table can thus be implemented as a table of referencesto resource components. An entry in the virtual partition table issometimes called a bucket and resource components in different bucketscan be initialized to point to different resource servers.

At 842 operations can then be performed on the session resourcecomponent to access a resource at a resource server. For example,various read, write, and display operations can be provided via sessionresource component functions. Although FIG. 8 describes a scenario inwhich the virtual partition table indicates a serving resourcecomponent, some system can use other information for accessing theparticular server on which the resource server resides.

The key used in 812 can be of any number of formats. For example, astring might specify a particular location within a web site. In somecases, requesting a resource may cause a resource component to request aresource via the resource manager. In other words, a resource componentmay be a consumer of the services provided by the resource manager.

Repartitioning Overview

FIG. 9 shows an overview of a method for repartitioning resourcesaccording to the architecture. Typically, a request to repartition isreceived by the resource administrator at 902. The request might beinitiated by a user via a resource administrator client and specify abucket of the virtual partition table for which resources are to bemoved to another resource server. For example, a new resource server canbe added. Half of the buckets pointing to the old resource server can bepointed to the new resource server.

At 912, a bucket of the partition table is locked. Locking involvescommunicating an indication to the resource managers that writeoperations are not permitted to resources associated with the bucket.However, reads are permitted, and read access can continue duringrepartitioning.

Then, at 932, resources relating to the bucket are copied. Such copyingtypically also includes verifying the resources were copied correctly.At 942, the bucket is unlocked. Unlocking involves communicating anindication to the resource managers that writes are permitted to theresources associated with the bucket.

Various other steps not shown are typically also included, such asdeleting the copied data from the old resource server and setting up atransaction mechanism to ensure data integrity. Such steps are describedin more detail below.

Exemplary Implementation

The following describes an exemplary implementation of the invention ina web site environment to support a large set of online communities. Thenumber of communities can grow to a very large number, and thepopularity of any particular community can fluctuate. Accordingly,resources supporting the communities may need to be repartitioned todifferent groups of machines to ensure users visiting the communitiesexperience consistent, quality service. An advantage of the describedarrangement is that access to the communities can continue duringrepartitioning functions. Further, a large number of buckets is used.Therefore, repartitioning involves moving a very small percentage of theresources at any one time, and service to browsing users is disruptedfor only very short periods of time.

Communities

Although techniques relating to the invention can be applied to avariety of scenarios, one particularly beneficial application is in thefield of online communities. As shown in FIG. 10, a service provider canprovide a set of online communities in the form of a community center,which can be visited by any user having a web browser. To capture auser's interest, the communities typically relate to a particularcategory. A community center can have hundreds of communities covering awide variety of subject matter.

Each community can offer an online place for people to communicate andshare information. For example, as shown in FIG. 11, the community canhave general community information 1112, including a description of thecommunity and an indication of the community's members. A message board1122 can provide a list of messages. Members can read the messages 1124and respond or expand.

Another community feature provides a list of photo albums 1132. Thephoto albums 1132 group together photographs 1134 for viewing bymembers, who can perform a variety of functions on the photographs 1134.Also, a file list 1142 allows community members to perform functions onfiles 1144.

As the number of communities and the number of people visiting thecommunities grow, the resources required to support the communities canbecome immense. Accordingly, the resources are partitioned using varioustechniques to provide consistent, quality service to persons visitingthe communities.

Implementation of Architecture

In the example, resources for the communities include two maincategories: resources drawn from SQL database servers (e.g., accessedwith MICROSOFT OLE DB), and resources stored as sets of files (e.g.,implemented as Universal Naming Convention (UNC) shares accessed byServer/Session Message Block (SMB)). In other scenarios, other protocolsfor accessing a resource server could be used (e.g., SOAP, DAV, MAPI,and CIFF).

FIG. 12 shows an exemplary architecture for implementing an onlinecommunity center. HTTP Requests 1212 are directed to a number of webservers 1222A-1222N. Each of the web servers 1222A-1222N includes anHTTP request receiver and processor 1226 (e.g., the MICROSOFT InternetInformation Server (IIS), including the MICROSOFT Internet Server API).To fulfill the HTTP requests, the web server can draw on a resourcemanager 1232 (e.g., installed on the machine as resmgr.dll).

Resources at the online community center include those provided by a setof SQL servers 1242 (e.g., SQL1A and SQL1B), which include generalcommunity information and message boards. A set of photo servers 1246include a set of server clusters devoted to serving digital photographsrelated to photo albums. A set of file servers 1252 include a set ofserver clusters devoted to serving files related to file lists.

A resource administrator 1262 serves as a store for partitioning andresource type information consumed by the resource managers on the webservers 1222A-1222N. The resource administrator client 1272 provides auser interface for manipulating and monitoring the operation of theresource administrator 1262. Although connections are not shown, theresource administrator 1262 and resource administrator client 1272 mayperform operations on the resource servers.

Resource Types

The resource types shown in the online community center are exemplaryonly and may change over the life of the online community center. Forexample, at some future date, it may become desirable to add a clusterof audio servers storing audio files related to a community.

In the illustrated implementation, there are two categories of resourcetypes, physical and logical. The physical resource types are a broadcategory roughly corresponding to a cluster of resources (e.g.,database-based and file-based). Logical resource types relate toresource are stored within a resource server of one of the physicalresource types. Example logical resource types include photo albums,photographs, message boards, and files. One advantage of dividing theresources as described is that a particular server cluster can beoptimized to serve a particular type of resource. For example,operations related to the photo servers 1246 may include specializedtechniques for dealing with digital photographs.

Virtual Partition Table

In the illustrated example, the resource managers (e.g., 1232) include avirtual partition table 1302 as shown in FIG. 13A. The virtual partitiontable 1302 can be implemented as a two dimensional array having a sizeof the number of resource types in one dimension and the number ofpossible virtual partition values (e.g., possible index values) in theother dimension. In the example, the number of possible virtualpartition values is 12,889, and the virtual partition value isdetermined by performing a hash function on the community name. Thus,the community name is sometimes called the partition key. Alternativepartition keys include information related to a user (e.g., to allow auser to change her profile).

As shown generally in FIG. 13A, resources are partitioned by assigningthe entries (or “buckets”) of the virtual partition table 1302 tovarious resource servers. As shown in the example, there are threeresource servers providing resources of type 1, and the buckets aredivided evenly among the three servers. There are two servers providingresources of type 2, and the buckets are divided evenly between the twoservers. There is only one server providing resources of type 3, and soall buckets are devoted to the one server.

In FIG. 13B, an illustration of the virtual partition table 1302 showsan alternative structure. Rather than simply storing a number indicatingthe content server, the virtual partition table includes a reference toa resource component related to the content server. In this way, eachbucket in the virtual partition table 1302 is associated with one of theresource components 1322. The resource components 1322 are components ofa class having logic for providing a way to access a resource serverserving the appropriate resource type (e.g., by providing a sessionresource component). As shown, multiple buckets can refer to the sameresource component. The reference to the resource component can take theform of an interface to the resource component. Each of the resourcecomponents includes at least one standard function, namely a functionfor handling a request for a resource. As a result of theabove-described arrangement, the code shown in FIG. 14 can handle arequest for a resource.

Thus, when a resource of a particular type relating to a particularcommunity is desired, the resource manager calls a method of theresource component associated with the community (via a hashingfunction) and the resource type, to obtain information from the resourcecomponent for accessing the resource. Since each of the resourcecomponents 1322 referred to by the partition table 1302 includes astandard function, logic for dealing with the virtual partition table1302 need not be tailored to accommodate a particular resource type. Inother words, the resource components 1322 encapsulate the detailsrelating to accessing a particular resource type.

In the illustrated architecture, the information returned by thestandard function is a reference (e.g., interface) to a session resourcecomponent for providing access to the appropriate resource server. Theprovided session resource component may include special functions forhandling the particular resource type. In some cases, the reference maybe to the same resource component linked to the virtual partition table.Examples of resource components are provided in more detail below.

Resource Manager

The resource manager fields requests for resources and uses the virtualpartition table to direct the requests to the appropriate resourceserver via the resource components.

In the example, the code listing shown in FIG. 15A shows the functionGetResource provided by the resource manager to be called by a programwishing to obtain access to a particular resource. In the examplesshown, the community name is used as the partition key. A hashingfunction shown in FIG. 15B is performed on the partition key to generatea number for indexing into the partition table (the virtual partitionvalue), and the logic shown in FIG. 14 invokes a function on anappropriate resource component.

When the resource manager is started, it performs the following actionsin order to prepare to field resource requests:

1. Register with the resource administrator to allow the resourceadministrator to send notifications. In this way, configuration changesrelating to the resources and virtual partition table can be directed tothe resource managers from the resource administrators.

2. Request the list of resource types from the resource administrator.Each resource type can be represented by a class identifier of aresource component that deals with the resources at runtime.

3. Create a multi-dimensional array of pointers, providing one row foreach resource type; each row consists of 12,889 buckets (one for eachvirtual partition).

4. For each resource type, request the list of resource instances. Aresource instance is specified by its type and a component specificinitialization string (e.g., “SQL:[Server=CPDCSQLA01; Database=WSComm;Login-CommSA; . . . ]” The initialization string can thus map theresource component instantiation to a specific physical resource havinga resource server. The string is typically specific to the resource andneed not be understood or processed by the resource manager, other thanto pass the string to the resource component for use when accessing aresource. A string is used to allow a wide variety of information;however, a different data structure (e.g., array or record) can be usedin an alternative architecture.

5. For each resource instance, create a resource component (e.g., viaCoCreateInstance) based on the resource type's CLSID and call aninitialization function on the created object, passing theinitialization string.

6. For each resource type, load the virtual partition table, which mapsthe virtual partitions to the resource components created above.

Resource Components

As described above, each of the resource components referred to in thevirtual partition table supports at least two functions, one forinitialization (e.g., via an initialization string) and one forobtaining a session resource component. In some cases (e.g., when stateinformation is not necessary), a resource component may fulfill therequest for a session resource component by providing a reference toitself. Operations can then be performed on a resource via the sessionresource component.

In the illustrated architecture, the two functions are grouped togetherin a public interface, IRMResource (e.g., derived from IUnknown), whichis implemented by each of the resource components referred to in thevirtual partition table. For example, a listing for a photo albumresource component is shown in FIGS. 16-17. A call toIRMResource:GetResource provides a reference to a session resourcecomponent, namely a photo object. A listing of the photo object is shownin FIG. 18. The code for the various functions (e.g., the AddPhotomethod) is constructed so that the data may reside on any physicalstore. The session resource component was pulled from a resourcecomponent encapsulating information about the physical store (which wasprovided to the resource component via the initialization string).

An example way of using resource components is shown in the code listingof FIG. 19. In the example, a program accesses a resource via theresource manager by calling the resource manager's GetResource function,which in turn forwards the call to the appropriate GetResource functionof a resource component in the virtual partition table, which returns aninterface to a photo resource component (the session resourcecomponent).

Functions to be performed on the resource (e.g., viewing, adding ordeleting a photo) can be accomplished by directing calls to the providedinterface to the session resource component. Although the sessionresource component may provide custom functionality, the resourcecomponent referenced in the virtual partition table need only provide astandard set of functions that take the same parameters, regardless ofthe resource type. In this way, new resource types can be added to thearchitecture without redesigning the way the resource manager interactswith the resource components.

An additional interface, IRMResource, is shown in FIG. 20 and includesfunctions for validating configuration and repartitioning, which isdescribed in more detail below.

Resource Administrator

The resource administrator of the illustrated architecture maintains amaster copy of the virtual partition table and orchestratesrepartitioning as described in greater detail below. Various datastructures defined for use with the resource administrator are shown inFIG. 21, and an interface IRMAdmin is shown in FIG. 22. IRMAdmin isprovided for access by resource managers to obtain a list of resourcetypes and the list of resources for a given type. Another interfaceIRMAdminOps is shown at FIGS. 23-24. IRMAdminOps is provided for accessby a resource administrator client to perform various functions,including repartitioning.

Resource Administrator Client

In the illustrated implementation, a resource administrator clientprovides a graphical user interface and a command line interface forcommunicating with the resource administrator. An interfaceIRMAdminOpsSink can provide a communication path from the resourceadministrator to the resource administrator client.

The interface IRMAdminClient provides a set of functions that the userinterface can call to accomplish a wide variety of tasks, such as addingnew resource types, and migrating buckets to accomplish repartitioning.Code listings for the IRMAdminClient interface are shown at FIGS. 25-29.The part of the resource administrator client that performs tasks asdirected by the user interface is sometimes called the “worker.”

Repartitioning

In the illustrated implementation, repartitioning is initiated by a userwho selects a repartitioning command via the resource administratorclient. Repartitioning can be used under a variety of scenarios. Forexample, if a new resource server is being added to share the load ofresource requests, repartitioning can be used to direct a percentage ofthe resource requests to the new resource server. Also, the buckets canbe rebalanced among the existing resource servers or an existingresource server might be replaced with another.

A typical repartitioning command specifies that a particular bucket isto be moved to a specified destination resource server. The resourceadministrator client also provides a way to automate the process ofadding a new resource server by translating a single “add resourceserver” command into multiple move bucket commands. For example, if athird resource server is being added to a web site, the resourceadministrator client can generate a move bucket command to moveone-third of the buckets to the new resource server. The actual bucketnumbers to be moved can be automatically randomly selected.

A method for repartitioning in the illustrated implementation is shownin FIG. 30. At 3002, the list of buckets to be migrated is assembled.Typically, a bucket is denoted by a bucket number and a resource typebecause there are multiple buckets per bucket number. At 3012, themethod starts with the first bucket. At 3032, the bucket is migrated asdescribed in more detail below. If there are more buckets at 3042, themethod loops using the next bucket at 3025. Otherwise, the method ends.

Further detail concerning migrating a bucket is shown in FIG. 31. At3102, the source and destination servers are prepared for the bucketmigration. Typically, a transaction repartitioning resource component iscreated for the source and destination resource servers. In theillustrated implementation, the transaction repartitioning resourcecomponent is sometimes called a “physical” resource component because itroughly corresponds to a physical unit (e.g., one resource servercluster). The transaction repartitioning resource components support theIRMTransaction interface, which includes methods for beginning atransaction, rolling back the transaction, and committing thetransaction. 3102 includes a call to begin the transaction. For example,if the resource server includes a SQL database, the transactionrepartitioning resource component might begin a SQL transaction.

At 3112, a write lock is acquired for the bucket being migrated. Thefunction IRMAdminOps:GetBucketWriteLock of the resource administratorreturns a handle which is subsequently used to release the lock. Lockscan be set to time out after a certain time period (e.g., an hour).Although the logic of the resource administrator will allow an unlimitednumber of locks, the resource administrator client typically limits thenumber of concurrent locks (e.g., a maximum of five concurrent locks).Locks are stored in a table in memory. If the resource administratorcrashes, the table is released and the buckets are considered unlocked.The resource manager automatically attempts to reconnect to the resourceadministrator and reload information relating to the buckets.

The resource administrator propagates the lock to the individualresource managers via the function IRMAdminSink:UpdateWriteLock.Responsive to receiving an indication that a bucket is locked, theresource manager updates the virtual partition table to indicate thebucket is locked. Whenever a resource component is requested from awrite-locked bucket, the resource manager will operate as usual, exceptthat the flag (RM_FLAG_WRITE_LOCK (0x0100)) is passed to the component(e.g., either by an init method or via flags). The component is designedso as to not perform any writing operations when it is notified that thewrite lock is in effect. However, read operations can continue duringrepartitioning.

At 3132, the method waits for any outstanding tasks to complete anypending write operations. For example, a resource component createdbefore a bucket was write locked may be about to perform a writeoperation. Although a count of unreleased resource components can bemaintained to ensure there are no outstanding components (e.g., bywaiting for the count to be zero), waiting a certain time period (e.g.,four seconds) is usually sufficient.

At 3142, data relating to the bucket is copied from the source resourceserver to the destination resource server. Further details of the copyprocess are provided below. At 3152, the partition map is changed topoint to the destination server and propagated to the individualresource managers. At 3162, the write lock acquired at 3112 is released.At 3172, the data on the source resource server relating to the migratedbucket is deleted in reverse dependency order. Dependency order isdescribed in more detail in the description of copying data below. Then,at 3182, repartitioning is finished. Finishing typically includescommitting any outstanding transactions by invokingIRMTransaction:Commit on the transaction repartitioning resourcecomponents.

Copying resources from the source resource server to the destinationresource server can be accomplished by a method such as that shown inFIG. 32. In the illustrated implementation, a resource type can refer toeither a physical or logical resource type. A physical resource typeroughly corresponds to a physical unit (e.g., a SQL server cluster). Alogical resource type specifies a particular type of resource (e.g., adigital photo or a message board). Thus, several logical resource typesmight be stored within a physical resource type. Each of the logicalresource types has a corresponding logical repartitioning resourcecomponent that implements an interface IRMRepartitioning having themethods CopyBucket and DeleteBucket.

At 3202, a list of the logical repartitioning resource componentsrelating to the physical resource type is assembled from arepartitioning order table. The repartitioning order table tracks whichlogical resource types are stored in a physical resource type andensures dependencies in the data are preserved. At 3212, for eachresource component appearing in the list, copy requests are issued inthe order the components appear in the list. A resource component iscreated and IRMRepartitioning:CopyBucket is called, providing the sourceand destination transaction repartitioning resource components.

At 3232, the resources for the bucket relating to the resource type arecopied. The resources involved are those with identifiers having a hashvalue corresponding to the bucket. To facilitate copying, the hash valuecan be stored with the data. For example, a field in a database mightindicate the hash value. At 3242, if there are more resource componentsappearing in the list, the method continues at 3232. Otherwise, themethod ends. Although the illustrated implementation uses physical andlogical resource types, similar results can be achieved withoutcategorizing resources as physical or logical. For example, all resourcetypes could be called “physical” resource types.

Adding Resource Types

New resource types can be added via the resource administrator client. Aclass identifier of the resource component to be installed is specifiedto the resource administrator client, which makes appropriate calls tothe resource administrator to register the new resource type.

Command Line Interface

The resource administrator client provides both a graphical userinterface and a command line interface. Typically, various directivesare scheduled in a queue until a “commit” command is issued. Variouscommands are shown in Table 1.

TABLE 1 Commands available at command line Description Form Examplereset (cancel) RESET RESET scheduled operations commit (execute) COMMITCOMMIT scheduled operations Add/remove a resource [ADD|REMOVE] TYPE type(default is add) TYPE [{clsid}| Photo.RMPhotoAlbum {progid}]Add/change/remove [ADD|CHANGE| ADD RESOURCE resource server. The REMOVE]/Type:0 /InitInfo: change command can RESOURCE {resid} “Server=Spidey1;take a resource server [Type:{Typeid} Database=Dynacomm; offline.[/InitInfo:{string}] User=Desiree; [Status:[ACTIVE| Pwd=Panama” OFFLINE][/Commit] Migrate buckets; a MOVE BUCKETS MOVE BUCKETS number orpercentage TYPE {typeid} TYPE 0 can be specified for FROMRESOURCEFROMRESROUCE 1 BucketCount {resid} TORESOURCE TO RESOURCE 2 {resid}/BucketCount: 40% [/BucketCount: {number}] [/Commit] Query informationSHOW [TYPES| SHOW about system. Default RESOURCES| shows all items.BUCKETS|TASKS]Interfaces of the Exemplary Implementation

Table 2 shows a list of interfaces provided by various elements of theexemplary implementation. In an alternative architecture, thefunctionality of the interfaces might be provided in another way (e.g.,a set of functions or methods not necessarily grouped into aninterface).

TABLE 2 Interfaces provided in the Exemplary Implementation NameImplemented by Description IRMResource Resource component Initializeresource components in virtual partition table and provide reference tosession resource component upon request IRMResourceOps Resourcecomponent Provides functionality to move buckets custom Session resourceProvides functionality component for performing operations on a resource(e.g., functionality to access a UNC resource or functionality to accessa photo album) IRMTransaction Transaction Begin, rollback, orrepartitioning (Physical) commit transaction on resource componentresource server IRMRepartitioning Logical (Repartitioning) Copyinformation Resource Component related to bucket to another resourceserver IRMAdminSink Resource Manager Includes function UpdateWritelockto make sure any subsequent requests for components are write lockedIRMAdminOps Resource Administrator For use by Resource AdministratorClient IRMAdminClient Resource Administrator Includes command for Clientmigrating buckets

Example Operation Fielding a Request for a Resource

The following is provided as an example of operation only. The inventionis not limited to the specifics described.

In an exemplary system using the principles outlined above, a browsinguser can find her way to photo albums kept for a community dealing withgreen tea by pointing her web browser to

-   -   http://content.communities.msn.com/GreenTea/PhotoAlbum.        A particular photo album is found by navigating to    -   http://content.communities.msn.com/isapi/fetch.dll?        action=get_album&ID_Community=GreenTea&ID_Topic=3.        When the above request is received by a web server in the web        farm, it is received by logic for dealing with a “get_album”        directive, which sends a request to the web server's resource        manager. The request requests a resource component to handle        photo album functions. The community name “GreenTea” is used as        the partition key, and the resource type is PhotoAlbum. The        resource manager performs a hash on the string “GreenTea” to        generate a virtual partition value.

In the virtual partition table, a bucket for the virtual partition valueand the resource type points to the interface of a component thatreturns a reference to a session component for dealing with photoalbums. The component handles requests to view, add, or delete photos bymanipulating data on a particular content server, as was determined byan earlier-supplied initialization string.

Requests for photo albums of another community (e.g., “Echinacea”) aresent to the resource manager, which performs a hash on the communityname. Since the bucket relating to photo albums for “Echinacea” pointsto a resource component referencing another content server, requests forresources are divided between two different servers. The resources forthe two communities are thus partitioned. Further, resources of adifferent type (e.g., message boards) for the same community can bemigrated to another content server if desired. Thus, partitioning withina community can also be accomplished.

REPARTITIONING EXAMPLE

A web site is configured so that there are at least four resource typesas shown in Table 3. Thus, the message boards, general communityinformation, and photo albums are stored on a resource server of type“SQL1,” a SQL database.

TABLE 3 Resource Types TypeId Description Physical? ClsId 0 SQL1 TRUE {. . . } 1 MsgBoard FALSE { . . . } 2 CommInfo FALSE { . . . } 3PhotoAlbum FALSE { . . . }The web site administrator sits at a computer and submits a request tomove a set of buckets from a source resource server of type SQL1(considered a “physical resource” type) to a destination resource serverof type SQL1. The request is typed at a command line for submission tothe resource administrator client.

The resource administrator client creates two instances of a transactionrepartitioning resource component: one for the source and one for thedestination. IRMTransaction:BeginTransaction is called on bothcomponents, and the resource administrator client reads therepartitioning Order Table for the resource types MsgBoard, CommInfo,and PhotoAlbum, which are shown in Table 4.

TABLE 4 Repartitioning Order Physical TypeId CompId 0 2 [CommInfo] 0 1[MsgBoard] 0 3 [PhotoAlbum]The first component in dependency order is CommInfo (first in theTable). The resource administrator client creates an instance of it andcalls IRMRepartitioning:CopyData. The same is then done with the othertwo components, in order. After copying is over, calls are made inreverse order to IRMRepartitioning:DeleteData. If the operationssucceed, the resource administrator client calls IRMTransaction:Commiton the source and destination resource components and releases them.Alternatives

Having described and illustrated the principles of our invention withreference to illustrated embodiments, it will be recognized that theillustrated embodiments can be modified in arrangement and detailwithout departing from such principles. Although the illustratedarchitecture involves communities, the principles of the architecturecan be applied to a wide variety of scenarios, such as a mail system(e.g., the partition key could be a user name), a file system (e.g., thepartition key could be a filename, directory path, or combination of thetwo), or another collection of resources. It should be understood thatthe programs, processes, or methods described herein are not related orlimited to any particular type of computer apparatus, unless indicatedotherwise. Various types of general purpose or specialized computerapparatus may be used with or perform operations in accordance with theteachings described herein. Elements of the illustrated embodiment shownin software may be implemented in hardware and vice versa. In view ofthe many possible embodiments to which the principles of our inventionmay be applied, it should be recognized that the detailed embodimentsare illustrative only and should not be taken as limiting the scope ofour invention. Rather, we claim as our invention all such embodiments asmay come within the scope and spirit of the following claims andequivalents thereto.

1. A computer-implemented method for altering the configuration of oneor more resource managers operable to establish connections with one ormore resource servers, wherein information for establishing connectionswith the one or more resource servers resides at the one or moreresource managers, and the one or more resource managers are configuredto communicate with a resource administrator, the method comprising:indicating, at the resource administrator, a change in the informationfor establishing connections with the one or more resource servers; andpropagating the change in the information for establishing connectionswith the one or more resource servers to the one or more resourcemanagers, wherein the one or more resource managers are configured tostore the change in the information in a virtual partition table indexedby one or more resource types, wherein the information for establishingconnections with the one or more resource managers comprises a stringprovided to one of the resource servers to establish a connectionthereto, and wherein the string comprises a username and a password forthe username.
 2. The method of claim 1, further comprising, with atleast one of the one or more resource managers, establishing aconnection with at least one of the one or more resource servers usingat least some of the changed information.
 3. The method of claim 1,wherein the virtual partition table is further indexed by a hash valueobtainable by performing a hash value calculation on a community name.4. The method of claim 1, wherein the resource administrator isimplemented at least in part on a first computer, wherein at least oneof the one or more resource managers is implemented on a secondcomputer, and wherein the first computer is remotely located from thesecond computer.
 5. The method of claim 1, wherein the indicating, atthe resource administrator, the change in the information forestablishing connections with the one or more resource servers comprisesreceiving a configuration change command from a resource administratorclient.
 6. The method of claim 1, further comprising generating thevirtual partition table at the one or more resource managers.
 7. Acomputer-implemented method for altering the configuration of one ormore resource managers operable to establish connections with one ormore resource servers, wherein information for establishing connectionswith the one or more resource servers resides at the one or moreresource managers, and the one or more resource managers are configuredto communicate with a resource administrator, the method comprising:indicating, at the resource administrator, a change in the informationfor establishing connections with the one or more resource servers; andpropagating the change in the information for establishing connectionswith the one or more resource servers to the one or more resourcemanagers, wherein the one or more resource managers are configured tostore the change in the information in a virtual partition table indexedby one or more resource types, wherein the virtual partition table isfurther indexed by a hash value obtainable by performing a hash valuecalculation on user information.
 8. One or more computer-readablestorage media containing instructions configured to cause a computer toperform a method, the method comprising: indicating, at a resourceadministrator configured to communicate with one or more resourcemanagers, information for establishing a connection between at least oneof the one or more resource managers and one or more resource servers;and providing, to at least one of the one or more resource managers, theinformation for establishing a connection between at least one of theone or more resource managers and at least one of the one or moreresource servers, wherein the at least one of the one or more resourcemanagers is configured to store the provided information in a virtualpartition table indexed by one or more resource types, wherein thevirtual partition table comprises one or more references to one or moreprogramming components, the one or more programming componentscomprising logic for interacting with at least one of the one or moreresource servers on which a requested resource resides, and wherein theone or more programming components comprise logic for accessing aselected resource type.
 9. The one or more computer-readable storagemedia of claim 8, wherein the virtual partition table is further indexedby a hash value obtainable by performing a hash value calculation on acommunity name.
 10. The one or more computer-readable storage media ofclaim 8, further comprising providing, to at least one of the one ormore resource managers, a list of the one or more resource types. 11.The one or more computer-readable storage media of claim 8, wherein theone or more resource types comprise physical resource types.
 12. The oneor more computer-readable storage media of claim 8, wherein the one ormore resource types comprise logical resource types.
 13. The one or morecomputer-readable storage media of claim 8, wherein at least one of theone or more resource servers is optimized for a selected resource type.14. The one or more computer-readable storage media of claim 8, whereinat least one of the one or more resource servers stores virtualpartitions for a plurality of resource types.
 15. The one or morecomputer-readable storage media of claim 8, wherein at least one of thereferences to one or more programming components comprises an interfaceto the one or more programming components.
 16. One or morecomputer-readable storage media containing instructions configured tocause a computer to perform a method, the method comprising: calculatinga numeric hash value for a particular community having a community namevia a hash value calculation on a text key comprising the community namecomprising a string of text characters corresponding to an online placefor people to communicate and share information on a particular topic;indicating, at a resource administrator configured to communicate with aplurality of resource managers, information for establishing aconnection between at least one of the plurality of resource managersand at least one of a plurality of resource servers; and providing, bythe resource administrator, to at least one of the plurality of resourcemanagers, the information for establishing the connection between atleast one of the plurality of resource managers and at least one of theplurality of resource servers, wherein the information comprises: avirtual partition table indexed by one or more resource types and bynumeric hash values corresponding to respective community names; whereinthe numeric hash values are obtainable by performing a hash valuecalculation on a text key, the text key comprising an associatedcommunity name, wherein the numeric hash values comprise the numerichash value for the particular community; and wherein the virtualpartition table comprises one or more references to one or moreprogramming components, the one or more programming componentscomprising logic for interacting with at least one of the plurality ofresource servers on which a requested resource resides.